<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>华为商城</title>
		<link rel="stylesheet" type="text/css" href="http://127.0.0.1/huaweishop/Static/Index/css/index.css"/>
		<link rel="stylesheet" type="text/css" href="http://127.0.0.1/huaweishop/Static/Index/css/animate.css"/>
		<script src="http://127.0.0.1/huaweishop/Static/Index/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		
		<script src="http://127.0.0.1/huaweishop/Static/Index/js/shuffling .js" type="text/javascript" charset="utf-8"></script>
		<script src="http://127.0.0.1/huaweishop/Static/Index/js/tab.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://127.0.0.1/huaweishop/Static/Index/js/lazy.js" type="text/javascript" charset="utf-8"></script>
		 
		<script type="text/javascript"> 
		$(function(){
			$("img").lazyload({ 
          placeholder : "http://127.0.0.1/huaweishop/Static/Index/images/ll.gif",
                 effect: "fadeIn"
           });  
		});
		
			

		</script> 
		<!--<style type="text/css">
			.lazy {
					  display: none;
					}
		</style>-->

	</head>
	<body>
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!--顶部导航开始-->
		<div id="topnav">
			<div class="top_left">
				<ul>
					<li><a href="">华为官网</a>|</li>
					<li><a href="">华为荣耀</a>|</li>
					<li><a href="">EMUI</a>|</li>
					<li><a href="">应用市场</a>|</li>
					<li><a href="">云服务</a>|</li>
					<li><a href="">开发者联盟</a>|</li>
					<li><a href="">花粉俱乐部</a></li>
				</ul>
				
			</div>
			<div class="top_right">
				<ul>
					<?php if (empty($hd['session']['uname'])){ ?>
					<li><a href="<?php echo U('Member/login');?>"><span>登陆</span> </a></li>					
					<li><a href="<?php echo U('Member/regist');?>"><span>注册</span></a>|</li>
					<?php }else{ ?>
					<li><a href="<?php echo U('Personal/index');?>"><span><?php echo $hd['session']['uname'];?></span></a>|<a href="<?php echo U('Member/out');?>"><span>退出</span></a></li>
					<?php } ?>
					<li><a href="">v码（优购码）</a>|</li>
					<li><a href="">手机版</a>|</li>
					<li><a href="">网站导航</a></li>
				</ul>
				
			</div>
		</div>
		<!--顶部导航结束-->
		<!--logo开始-->
		<div id="header">
			<div class="logo">
				<a href="<?php echo U('Index/index');?>"><img src="http://127.0.0.1/huaweishop/Static/Index/images/Logo.png"/></a>
			</div>
			<div class="search">
				<form action="" method="post">				
					<input type="text" name="" class="box" /><input class="button" type="submit" value="搜索"/>
				</form>
				<span>热门搜索：
					<a href="">荣耀7</a>
					<a href="">麦芒4</a>
					<a href="">华为p8</a>
					<a href="">指纹识别</a>
					<a href="">指纹识别</a>
					<a href="">指纹识别</a>
				</span>
			</div>
			<div class="shop">
				<div class="mall">
				    <a class="a" href="">我的商城</a>	
				</div><span>|</span>
				<div class="cart">
					<a class="a" href="">我的购物车</a>
					<div class="cart_in">
						    <?php if(!$_SESSION['cart']['goods']){ ?>
						<p style="line-height: 110px;">您的购物车是空的赶紧选购吧</p>
						<?php }else{ ?>
						<div class="thing">
							<table class="cart-thing"  width="100%" cellspacing="0" cellpadding="0" style="margin: 0 auto; ">
								<?php foreach ($_SESSION['cart']['goods'] as $k=>$v){?>
								<tr >
									<td style="border-bottom: 1px solid #FAFAFA;"><img width="78" height="78" src="http://127.0.0.1/huaweishop/<?php echo $v['pic'];?>"/></td>
									<td style="border-bottom: 1px solid #FAFAFA;" width="60%"><p><a href=""><?php echo $v['name'];?></a></p><h1>¥ <?php echo $v['price'];?> <i>×<?php echo $v['num'];?></i>  </h1></td><td style="text-align: center; width: 20%; border-bottom: 1px solid #FAFAFA;"><a href="<?php echo U('Cart/del',array('id'=>$k));?>" class="btn_x" >删除</a></td>
								</tr>
								<?php }?>
							</table>
							<div class="payall">
								<h2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;共<s><?php echo $hd['session']['cart']['total_rows'];?></s>件商品，金额合计<s>￥<?php echo $hd['session']['cart']['total'];?></s></h2>
								<div class="money">
									<a style="color: #FFFFFF;" href="<?php echo U('Cart/index');?>">去结算</a>
								</div>
							</div>
						</div>
						<?php } ?>
						
					</div>
				</div>
			</div>
			<div class="code">
				<a href=""><img width="75" src="http://127.0.0.1/huaweishop/Static/Index/images/code.jpg"/></a>
				<span id="">
					微信扫码关注我们
				</span>
			</div>
		</div>
		
		<div class="clean"></div>
		<!--logo结束-->
		<!--nav开始-->
		<div id="nav">
			<div class="all">
				<a href="">全部商品</a>
				<div class="leftsidebar">
					<?php foreach ($cate as $k=>$v){?>
					<div class="category">
						<h3><a style="font-size: 16px;" href="<?php echo U('List/index',array('cid'=>$v['cid'],'pid'=>$v['pid']));?>"><?php echo $v['cname'];?></a></h3>
						<?php foreach ($v['son'] as $kk=>$vv){?>
						<a href="<?php echo U('List/index',array('cid'=>$vv['cid'],'pid'=>$vv['pid']));?>"><?php echo $vv['cname'];?></a>
						<?php }?>
						<div class="subtitle">
							<?php foreach ($v['sons'] as $kk=>$vv){?>
							<h4><a href="<?php echo U('List/index',array('cid'=>$vv['cid'],'pid'=>$vv['pid']));?>"><?php echo $vv['cname'];?></a></h4>
							<?php }?>
						</div>
					</div>
					<?php }?>
					
				</div>
			</div>
			<ul>
				<li class="bg"><a href="<?php echo U('Index/index');?>">首页</a></li>
				<?php foreach ($nav as $k=>$v){?>
				<li><a href="<?php echo U('List/index',array('cid'=>$v['cid'],'pid'=>$v['pid']));?>"><?php echo $v['cname'];?></a></li>
				<?php }?>
			</ul>
		</div>
		<!--nav结束-->

		<!--banner开始-->
		<div id="banner">
			<div class="ad">
				<a style="display:inline-block;" href="">
					<img  src="http://127.0.0.1/huaweishop/Static/Index/images/banner1.jpg"/>
				</a>
				<a href="">
					<img style="" src="http://127.0.0.1/huaweishop/Static/Index/images/banner2.jpg"/>
				</a>
				
			</div>
		</div>
		<!--banner结束-->
		
		<div id="main" >
			<div class="main_left">
				<?php foreach ($randgoods as $k=>$v){?>
				<div class="mad">
					<div class="phone">
						<a href="<?php echo U('Content/index',array('cid'=>$v['category_cid'],'gid'=>$v['gid']));?>"><img width="222" height="222" src="http://127.0.0.1/huaweishop/<?php echo $v['pic'];?>"/></a>
					</div>
					<div class="msg">
						<h1><?php echo $v['gname'];?></h1>
						
						<p>上架时间：<?php echo date('Y-m-d',$v['sendtime']);?></p>	
						<span>
							
						</span>
						<h2>￥<?php echo $v['price'];?> <a class="btn" href="<?php echo U('Content/index',array('cid'=>$v['category_cid'],'gid'=>$v['gid']));?>">立即抢购</a></h2>
						
						
					</div>
				</div>
				<?php }?>	
			</div>
			<div class="main_right">
				<div class="sidead">
					<a href=""><img height="308" src="http://127.0.0.1/huaweishop/Static/Index/images/sidead.jpg"/></a>
				</div>
				<!--公告-->
				<div class="news">
					<div class="title">
						<div class="tl">
							<a href="">公告</a>
							<ul class="content1">
								<li><a href="">【中奖名单】荣耀7i震撼首发，预约赢大奖...</a></li>
								<li><a href="">VMALL招聘季| JOIN US，FOR OUR DRE...</a></li>
								<li><a href="">VMALL招聘季| JOIN US，FOR OUR DRE...</a></li>
								<li><a href="">VMALL招聘季| JOIN US，FOR OUR DRE...</a></li>
						    </ul>
						</div>
						<div class="tr">
							<a href="">新闻</a>
							<ul class="content2">
								<li><a href="">VMALL招聘季| JOIN US，FOR OUR DRE...</a></li>
								<li><a href="">VMALL招聘季| JOIN US，FOR OUR DRE...</a></li>
								<li><a href="">VMALL招聘季| JOIN US，FOR OUR DRE...</a></li>
								<li><a href="">VMALL招聘季| JOIN US，FOR OUR DRE...</a></li>
							</ul>
						</div>
					</div>	
				</div>
				<!--公告-->
				<div class="img">
					<a href=""><img src="http://127.0.0.1/huaweishop/Static/Index/images/img.jpg"/></a>	
				</div>
				
			</div>
			
		</div>
	<!--广告-->
	<div id="advert">
		<a href=""><img src="http://127.0.0.1/huaweishop/Static/Index/images/ad1.jpg"/></a>
	</div>
	<!--广告结束-->
	<!--手机开始-->
	        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($main)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($main as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($main)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
	<div class="telphone">
		<!--标题开始-->
		<div class="thistitle">
			
			<div class="left">
				<span >
			    </span>
				<h1><a class="acolor" href=""><?php echo $v['cname'];?></a><a href="">华为精品</a></h1>
				
			</div>
			<div class="right">
				<ul>
					        <?php
        //初始化
        $hd['list']['vv'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['sons'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($v['sons'] as $vv) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][vv]['index']++;
                //第1个值
                $hd['list'][vv]['first']=($listId == 0);
                //最后一个值
                $hd['list'][vv]['last']= (count($v['sons'])-1 <= $listId);
                //总数
                $hd['list'][vv]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
					<li><a href="<?php echo U('List/index',array('cid'=>$vv['cid'],'pid'=>$v['cid']));?>"><?php echo $vv['cname'];?></a></li>
					<?php }}?>
					
				</ul>
			</div>
			
		</div>
		<!--标题结束-->
		<div class="main">
			        <?php
        //初始化
        $hd['list']['vv'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['goods'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($v['goods'] as $vv) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=1)break;
                //第几个值
                $hd['list'][vv]['index']++;
                //第1个值
                $hd['list'][vv]['first']=($listId == 0);
                //最后一个值
                $hd['list'][vv]['last']= (count($v['goods'])-1 <= $listId);
                //总数
                $hd['list'][vv]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
			<div class="cont bgroun">
				<div class="limg">
					<a href="<?php echo U('Content/index',array('cid'=>$vv['category_cid'],'gid'=>$vv['gid']));?>"><img width="222" height="222" src="http://127.0.0.1/huaweishop/<?php echo $vv['pic'];?>"/></a>
				</div>
				<div class="rcon">
					<h1><a href="<?php echo U('Content/index',array('cid'=>$vv['category_cid'],'gid'=>$vv['gid']));?>"><?php echo $vv['gname'];?></a></h1>
					<span></span>
					<h2><a href="<?php echo U('Content/index',array('cid'=>$vv['category_cid'],'gid'=>$vv['gid']));?>">￥<?php echo $vv['price'];?></a><a class="btn" href="<?php echo U('Content/index',array('cid'=>$vv['category_cid'],'gid'=>$vv['gid']));?>">立即抢购</a></h2>
				</div>
				
			</div>
			<?php }}?>
			        <?php
        //初始化
        $hd['list']['vv'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['goods'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=1;
            foreach ($v['goods'] as $vv) {
                //开始值
                if ($listId<1) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=6)break;
                //第几个值
                $hd['list'][vv]['index']++;
                //第1个值
                $hd['list'][vv]['first']=($listId == 1);
                //最后一个值
                $hd['list'][vv]['last']= (count($v['goods'])-1 <= $listId);
                //总数
                $hd['list'][vv]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
			<div class="hot bgroun">
				<a class="mate" href="<?php echo U('Content/index',array('cid'=>$vv['category_cid'],'gid'=>$vv['gid']));?>"><img width="222" height="222" class="lazy" src="http://127.0.0.1/huaweishop/Static/Index/images/ll.gif" data-original="http://127.0.0.1/huaweishop/<?php echo $vv['pic'];?>"/></a>
				<a href="<?php echo U('Content/index',array('cid'=>$vv['category_cid'],'gid'=>$vv['gid']));?>"><?php echo $vv['gname'];?></a>
				<h1>￥<?php echo $vv['price'];?></h1>
			</div>
			<?php }}?>
			
			
		</div>
	</div>
	
    <!--手机结束-->
    <div class="clean"></div>
    <?php }}?>
  <!--广告-->
 <div id="advertising">
 	<a href=""><img src="http://127.0.0.1/huaweishop/Static/Index/images/adverting.jpg"/></a>
 </div>
 <!--广告-->
 <!--软件-->
 <div id="soft">
 	<div class="app">
 		<ul>
 			<li><a href=""><img src="http://127.0.0.1/huaweishop/Static/Index/images/hwsoft.png"/></a></li>
 			<li><a href=""><img src="http://127.0.0.1/huaweishop/Static/Index/images/sina.png"/></a></li>
 			<li><a href=""><img src="http://127.0.0.1/huaweishop/Static/Index/images/qzone.png"/></a></li>
 			<li><a href=""><img src="http://127.0.0.1/huaweishop/Static/Index/images/android.png"/></a></li>
 		</ul>
 	</div>
 </div>
  <!--软件结束-->
<!--底部开始-->
  <!--服务-->
  <div id="service">
  	<ul>
  		<li><span></span> 500强企业 品质保证</li>
  		<li><span class="conf1"></span> 7天退货 15天换货</li>
  		<li><span class="conf2"></span> 100元起免运费</li>
  		<li style="margin-right: 0;"><span class="conf3"></span> 448家维修网点 全国联保</li>
  	</ul>
  </div>
  <!--服务结束-->
  <!--帮助中心-->
  <div id="help">
  	<ul class="help">
  		<h1><span></span> 帮助中心</h1>
  		<li><a href="">购物指南</a></li>
  		<li><a href="">配送方式</a></li>
  		<li><a href="">支付方式</a></li>
  		<li><a href="">常见问题</a></li>
  	</ul>
  	<ul class="sever">
  		<h1><span></span> 售后服务</h1>
  		<li><a href="">购物指南</a></li>
  		<li><a href="">配送方式</a></li>
  		<li><a href="">支付方式</a></li>
  		<li><a href="">常见问题</a></li>
  	</ul>
  	<ul class="tech">
  		<h1><span></span> 技术支持</h1>
  		<li><a href="">购物指南</a></li>
  		<li><a href="">配送方式</a></li>
  		<li><a href="">支付方式</a></li>
  		<li><a href="">常见问题</a></li>
  	</ul>
  	<ul class="about">
  		<h1><span></span> 关于商城</h1>
  		<li><a href="">购物指南</a></li>
  		<li><a href="">配送方式</a></li>
  		<li><a href="">支付方式</a></li>
  		<li><a href="">常见问题</a></li>
  	</ul>
  	<ul class="Focus">
  		<h1><span></span> 关注我们</h1>
  		<li><a href="">购物指南</a></li>
  		<li><a href="">配送方式</a></li>
  		<li><a href="">支付方式</a></li>
  		<li><a href="">常见问题</a></li>
  	</ul>
  	
  </div>
  <!--帮助中心-->
  <!--友情链接-->
  <div id="link">
  	友情链接：<a href="">华为官网</a>|<a href="">华为消费者业务 </a>|<a href="">荣耀官网  </a>|<a href=""> 天天浏览器 </a>|<a href="">  莫塞尔商城</a>|<a href="">  爱旅官网 </a>|<a href="">  华为应用市场 </a>|<a href=""> 万表网  </a>|<a href="">手机之家</a>|<a href="">  中商情报网 </a>|<a href="">  钻石小鸟 </a>|<a href=""> 刷机精灵 </a>|<a href=""> 安卓市场 </a>|<a href=""> 优购物官网 </a>|<a href="">  移动叔叔 </a>|<a href=""> 奥特莱斯 </a>|<a href=""> 中关村商城 </a>|<a href=""> 酷狗音乐 </a>| 
  	
  		<a href=""><span style="color:#FF0000 ;"> 申请链接 >></span></a>
</div>
<!--友情链接-->
<h6>Copyright © 2011-2015 华为软件技术有限公司 版权所有 保留一切权利 苏B2-20130048号 | 苏ICP备09062682号-9 </h6>
<h2><a href="">网络文化经营许可证苏网文[2012]0401-019号</a></h2>
<h5><a href=""><img src="http://127.0.0.1/huaweishop/Static/Index/images/certificate_01.png"/></a><a href=""><img src="http://127.0.0.1/huaweishop/Static/Index/images/certificate_02.png"/></a><a href=""><img src="http://127.0.0.1/huaweishop/Static/Index/images/certificate_03.png"/></a></h5>
<!--底部结束-->
	</body>
</html>
